# Maintainer: Jan de Groot <jgc@archlinux.org>

pkgname=luit
pkgver=20201003
pkgrel=1
pkgdesc="Filter that can be run between an arbitrary application and a UTF-8 terminal emulator"
arch=('x86_64')
url="https://invisible-island.net/luit/luit.html"
license=('custom')
depends=('libfontenc')
makedepends=('libx11')
replaces=('xorg-luit')
conflicts=('xorg-luit')
source=(https://invisible-mirror.net/archives/${pkgname}/${pkgname}-${pkgver}.tgz{,.asc})
sha256sums=('c948da3c8b163e8e8f23cbe1255e7f3fa234c48aaf470b201ce55a3ecb4ad985'
            'SKIP')
validpgpkeys=('C52048C0C0748FEE227D47A2702353E0F7E48EDB') # "Thomas Dickey <dickey@invisible-island.net>"

build() {
  cd luit-${pkgver}
  ./configure --prefix=/usr --enable-fontenc
  make
}

package() {
  cd luit-${pkgver}
  make DESTDIR="${pkgdir}" install
  install -m755 -d "${pkgdir}/usr/share/licenses/${pkgname}"
  install -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/"
}
